<script setup lang="ts">
import { ref } from 'vue';
import config from '@/config'
import { useRouter } from 'vue-router';

const router = useRouter();

router.getRoutes().forEach(route => {
  console.log(route);
});
// 监听子应用发送给父应用的数据
const handleDataChange = (data: any) => {
  console.log("接收到子应用发送的数据", data);
};
const url = ref(`${config.app2}/base/demo/`);

console.log(url.value);
</script>

<template>
  <div>需要展示的主页面应用</div>
  <micro-app name="demo" :url="url" iframe base-route="/demo" @datachange="handleDataChange"></micro-app>
</template>

<style lang="scss" scoped></style>
